Functions

Function is a piece of code written by user that supports online editing and ZIP package uploading. It can be configured as follows:

  • Execution time limit: execution time of a function. When exceeding the function’s execution time limit, Cloud Functions will terminate the currently running function. The maximum execution time limit is 300s.
  • Memory limit: Memory resources allocated for a function. There are three options to choose from, 128M, 256M and 1024M.

  • Environment variables: Environment variables for functions enable you to dynamically pass settings to your function code and libraries, without making changes to your code. Environment variables are key-value pairs that you create and you can modify it in function configuration. Xiaomi Cloud Fucntions then makes these key value pairs available to your function code using standard APIs supported by the language

  • Code type: Cloud Functions currently supports two code-upload methods. The difference is that online editing mode allows you to enter code directly in console. If you choose a programming language that does not require compilation and does not rely on any libraries, you can use the online editing mode. ZIP package mode requires that you package the code into a compressed package in .zip format. ZIP package contains not only the code of the function, but also the dependent libraries used in the packaged function. Cloud Functions supports a maximum zip package size of 50M.

results matching ""

    No results matching ""